import  http from './axios'




 export function getBanner(){


    return http.get('/api/getbanner')
 }
 export function getIndexGoods(){


    return http.get('/api/getindexgoods')
 }


 //封装分类列表
export function getCateTree(){
   return http.get('/api/getcatetree')
}
export function getCateGoods(params){
   return http.get('/api/getgoods',{
        params
   })
}
export function getGoodsDetail(params){
   return http.get('/api/getgoodsinfo',{
        params
   })
}
//封装一个注册接口
export function register(data){
   return http.post('/api/register',data)
}
//封装一个登录接口
export function login(data){
   return http.post('/api/login',data)
}

//封装一个购物车列表
export function getCartList(params){
   return http.get('/api/cartlist',{
       params
   })
}

//封装一个购物车添加
export function addCart(data){
   return http.post('/api/cartadd',data)
}
//封装一个购物车添加
export function delCart(data){
   return http.post('/api/cartdelete',data)
}
